< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03100600.xhp

(section: clng) (bookmark: bm_id3153311)
CLng function

CLng 関数

CLng Function [Runtime]
CLng 関数 [実行時](hd_id3153311.1)

Converts any string or numeric expression to a long integer.
文字列および数値表式を、ロング整数の数値データに変換します。(par_id3148686.2)

(/section: clng)

Syntax:
構文:(hd_id3145315.3)

CLng (Expression)
CLng (Expression)(par_id3147573.4)

Return value:
戻り値:(hd_id3145610.5)

Long
ロング整数(par_id3153897.6)

Parameters:
パラメータ:(hd_id3154760.7)

Expression: Any numerical expression that you want to convert. If the Expression lies outside the valid long integer range between -2.147.483.648 and 2.147.483.647, Office Basic returns an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.
Expression: 変換させる数値表式。Expression がロング整数で扱える -2,147,483,648 から 2,147,483,647 の範囲に収まらない場合、Office Basic はオーバーフローエラーを出します。また文字列を変換する場合は、オペレーティングシステムが標準で使用する数の書式 (「123.5」など) でテキストを指定する必要があります。(par_id3159414.8)

This function always rounds the fractional part of a number to the nearest integer.
この関数で小数を変換すると、常に数値の小数部を丸めた整数値が返されます。(par_id3150358.9)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3154216.10)

Sub ExampleCountryConvert
Sub ExampleCountryConvert(par_id3147229.11)

Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)(par_id3156281.12)

Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)(par_id3153969.13)

Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)(par_id3154909.14)

end sub
end sub(par_id3153770.15)


< Prev / Next >